package com.huike.calendarviews;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    private Button but_onclic1;
    private Button but_onclic2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }

    private void initView() {
        but_onclic1 = (Button) findViewById(R.id.but_onclic1);
        but_onclic2 = (Button) findViewById(R.id.but_onclic2);

        but_onclic1.setOnClickListener(this);
        but_onclic2.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.but_onclic1:
                startActivity(new Intent(MainActivity.this,SimpleActivity.class));
                break;
            case R.id.but_onclic2:
                startActivity(new Intent(MainActivity.this,MultileActivity.class));
                break;
        }
    }
}
